<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>订单详情 - 宠物商城</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="/">宠物商城</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-label="切换导航">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#" id="categoriesLink">商品分类</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/cart.html">购物车</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="/orders.html">我的订单</a>
                    </li>
                </ul>
                <div id="userActions">
                    <!-- 用户操作区域将通过JavaScript动态加载 -->
                </div>
            </div>
        </div>
    </nav>

    <!-- 订单详情 -->
    <div class="container mt-4">
        <div class="row">
            <div class="col-md-8">
                <div class="card">
                    <div class="card-header">
                        <h4 class="mb-0">订单信息</h4>
                    </div>
                    <div class="card-body">
                        <div class="row mb-3">
                            <div class="col-md-6">
                                <p><strong>订单编号：</strong><span id="orderId"></span></p>
                                <p><strong>订单状态：</strong><span id="orderStatus"></span></p>
                            </div>
                            <div class="col-md-6">
                                <p><strong>下单时间：</strong><span id="orderDate"></span></p>
                                <p><strong>订单总额：</strong><span id="totalAmount"></span></p>
                            </div>
                        </div>
                        <div class="mb-3">
                            <h5>收货地址</h5>
                            <p id="shippingAddress"></p>
                        </div>
                    </div>
                </div>

                <div class="card mt-4">
                    <div class="card-header">
                        <h4 class="mb-0">商品清单</h4>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>商品图片</th>
                                        <th>商品名称</th>
                                        <th>单价</th>
                                        <th>数量</th>
                                        <th>小计</th>
                                    </tr>
                                </thead>
                                <tbody id="orderItemsList">
                                    <!-- 订单商品列表将通过JavaScript动态加载 -->
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <div class="card">
                    <div class="card-header">
                        <h4 class="mb-0">订单操作</h4>
                    </div>
                    <div class="card-body">
                        <div id="orderActions" class="d-grid gap-2">
                            <!-- 订单操作按钮将通过JavaScript动态加载 -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-dark text-white mt-5 py-3">
        <div class="container text-center">
            <p>&copy; 2024 宠物商城. All rights reserved.</p>
        </div>
    </footer>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script src="js/order.js"></script>
</body>
</html> 